<!DOCTYPE HTML>

<html>

<head>
	<title>奇幻之岛</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="content-language" content="zh-CN" />
	<script language="javascript" src="js/md5.js"></script>
	<script language='javascript'>
	<!--
		function submitUserPassword() {
			var ctl_user=document.getElementById("user");
			var ctl_pwd=document.getElementById("pwd");
			var pwd=MD5(ctl_pwd.value);
			var ctrl_backform=document.getElementById("back");
			var ctrl_user2=document.getElementById("user2");
			var ctrl_pwd2=document.getElementById("pwd2");
			ctrl_user2.value=ctl_user.value;
			ctrl_pwd2.value=pwd;
			var names=document.getElementsByName('imgcap');
			var ctl_count=document.getElementById('imgcount');
			ctl_count.value=names.length;
			for (i=0; i<names.length; i++)
			{
				id='imgcap'+i
				ctl_imgcap=document.getElementById(id)
				ctl_imgcap.value=names[i].value
			}
			ctrl_backform.submit();
			/*
			// DEBUG输出
			var text=document.getElementById('out');
			text.value="user: ";
			text.value+=ctl_user.value;
			text.value+="\npwd:  ";
			text.value+=pwd;
			text.value+="\ndate: ";
			text.value+=document.getElementById('date').value
			text.value+="\ncaptions:\n";
			for (i=0; i<names.length; i++)
			{
				text.value+='[';
				text.value+=i;
				text.value+='] ';
				text.value+=names[i].value;
				text.value+="\n";
			}
			*/
		}
	-->
	</script>
</head>

<body>
	<h2>PhotoDiary照片更新</h2>
	<form>
		<p><b style='margin-right: 1em;'>用户名</b><input id='user' name='user' type='text' size='16' maxlength=16>
		<b style='margin-left: 1em; margin-right: 1em;'>密码</b><input id='pwd' name='pwd' type='password' size='16' maxlength=16>
		<span style='margin-left: 1em;'><input id='submit' onclick='submitUserPassword(); return false;' type='submit' value='更新照片'/></span></p>
	</form>
	<hr/>
	<!--image begin-->
	<h3>2011年4月18日的照片</h3>
	<div id='content'>
		<div style='float:left; margin:0.5em;'>
			<img src="../server/photodiary/photos/201104/thumbs/20110418-00.jpg" alt="周一" />
			<form><input name='imgcap' type='text' size='22'/></form>
		</div>
		<div style='float:left; margin:0.5em;'>
			<img src="../server/photodiary/photos/201104/thumbs/20110418-01.jpg" alt="周一" />
			<form><input name='imgcap' type='text' size='22'/></form>
		</div>
	</div> <!--div content-->
	<!--image end-->
	<form id='back' action="http://localhost:8080/photodiary/update.html", method='post'>
		<input id='user2' name='user' type='hidden'>
		<input id='pwd2' name='pwd' type='hidden'>
		<input id='imgcount' name='imgcount' type='hidden'>
		<!--form begin-->
		<input id='imgcap0' name='imgcap0' type='hidden'>
		<input id='imgcap1' name='imgcap1' type='hidden'>
		<input id='date' name='date' type='hidden' value='20110418'>
		<!--form end-->
	</form>
	<!--DEBUG输出-->
	<!--div style='clear:both;'><textarea id='out' rows='8' cols='48'></textarea></div-->
</body>

</html>

